home *** CD-ROM | disk | FTP | other *** search
- #include <exec/memory.h>
- #include <proto/exec.h>
-
- #include "memwatch.h" /* To enable memlib, you must #define MWDEBUG to 1 */
-
- int main(void)
- {
- char *a;
-
- a = AllocMem(20, 0); /* Note that we never free this memory */
-
- a = AllocMem(10, 0);
-
- FreeMem(a, 9); /* Note that we free an incorrect length here */
-
- MWReport("At end of main()", MWR_FULL); /* Generate a memory usage report */
-
- return(0);
- }
-